# -*- coding: utf-8 -*-
# @Author: Tim Liu
# @Date: 2025-01-08
# @Last Modified by: Cursor
# @Last Modified time: 2025-01-08
import logging
# @Description: Graph Engine Baseclass
 
from typing import List, Dict, Any
from langchain_community.graphs.graph_document import GraphDocument

class GraphEngine:
    def remove_existing_nodes(self, node_id: str = None, file_url: str = None):
        """Remove existing nodes by node_id or file_url."""
        raise NotImplementedError

    def add_graph_documents(self, graph_documents: List[GraphDocument]):
        raise NotImplementedError
    
    def run_query(self, query: str) -> List[Dict[str, Any]]:
        """Run a query and return the results."""
        raise NotImplementedError    

    def get_nodes_by_type(self, node_type: str) -> List[Dict[str, Any]]:
        """Get nodes by type."""
        raise NotImplementedError    

    def create_vector_index(self, index_name: str, label: str, embedding_property: str, dimensions: int, similarity_fn: str, fail_if_exists: bool):
        """Create a vector index."""
        raise NotImplementedError

    def upsert_vector(self, node_id: str, embedding_property: str, vector: List[float]):
        """Upsert a vector for a node."""
        raise NotImplementedError    
        